package 上课day1;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class project_demo8 {
	public static void main(String[] args) {
		List<Student> list = new LinkedList<>();
		
		Student stu1 = new Student(11, "张三");
		Student stu2 = new Student(12, "李四");
		Student stu3 = new Student(13, "王五");
		Student stu4 = new Student(14, "刘柳");
		Student stu5 = new Student(15, "李琦");
		
		list.add(stu1);
		list.add(stu2);
		list.add(stu3);
		list.add(stu4);
		list.add(stu5);
		
		for (Student student : list) {
			System.out.println(student.getName() + "------" + student.getAge());
		}
	}
}
